package com.borrowed.book.weixin.service;

import com.alibaba.fastjson.JSONObject;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.security.spec.InvalidKeySpecException;

public interface WxPayService {
    //JSAPI预下单
    public JSONObject PayTransaction(BigDecimal total,String orderNo) throws Exception;
    //JSAPI支付通知
    public String PayNotifyResult (HttpServletRequest request, HttpServletResponse response) throws Exception;
    //JSAPI 退款申请
    public JSONObject PayRefund(BigDecimal refund,String orderNo,String reason) throws  Exception;
    //JSAPI 退款通知
    public String PayRefundNotify(HttpServletRequest request, HttpServletResponse response) throws Exception;
    //创建微信分支付订单
    public JSONObject CreatePaysocreOrder(String orderNo, BigDecimal total) throws Exception;
    //微信分支付确认订单回调通知
    public String scoreNotifyResult(HttpServletRequest request, HttpServletResponse response) throws Exception;
    //取消支付分订单
    public Boolean CanclePayscoreOrder(String orderNo,String reason) throws  Exception;
    //完成支付分订单
    public Boolean CompletePayscoreOrder(String orderNo) throws  Exception;

}
